package Observer;

/**
 * @Author Ldj
 * @Date 2018/2/28 11:02
 * @Description 数据处理
 */
public class HexaObserver extends Observer {

    public HexaObserver(Subject subject){
        this.subject = subject;
        this.subject.attach(this);
    }

    @Override
    public void update() {
        System.out.println( "Hexa String: " + Integer.toHexString( subject.getState() ) );
    }
}
